package com.wash.car.web.config.context;

import com.alibaba.ttl.TransmittableThreadLocal;

public class UserContext {
    public static final ThreadLocal<UserInfo> USER_CONTEXT_MAP = new TransmittableThreadLocal<>();

    public static void clear() {
        USER_CONTEXT_MAP.remove();
    }

    public static UserInfo get() {
        return USER_CONTEXT_MAP.get();
    }

    public static void add(UserInfo info) {
        USER_CONTEXT_MAP.set(info);
    }


}
